home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / precog2_1.lha / Precognition2_1 / include / Precognition3D.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-18  |  4.1 KB  |  130 lines

  1. /* ==========================================================================
  2. **
  3. **                       Precognition3D.h
  4. **
  5. **
  6. ** ©1991 WILLISoft
  7. **
  8. ** ==========================================================================
  9. */
  10.  
  11. #ifndef PRECOGNITION3D_H
  12. #define PRECOGNITION3D_H
  13.  
  14. #include "intuition_typedefs.h"
  15. #include "parms.h"
  16.  
  17. typedef struct pcg_3DPens
  18.    {
  19.       UBYTE FrontPen,   BackPen;    /* Foreground Pen, Background Pen */
  20.       UBYTE BrightPen,  DarkPen;    /* 3D Highlight, shadow.          */
  21.    } pcg_3DPens;
  22.  
  23.  
  24. /* ==================== pcg_3DBox ============================
  25. ** This type is compatible with a 'Border' structure.
  26. ** It is used to create a 3D looking box, like under
  27. ** Workbench 2.0.  It consists of 2 Border structures linked
  28. ** together.
  29. ** ===========================================================
  30. */
  31.  
  32. typedef struct pcg_3DBox
  33.    {
  34.       Border     TopLeft;       /* Top & Left edge of box.     */
  35.       Border     BottomRight;   /* Bottom & right edge of box. */
  36.       SHORT      Points[20];    /* Box outline.                */
  37.    } pcg_3DBox;
  38.  
  39. /* ======================= pcg_3DBevel ========================
  40. ** This type is compatible with a 'Border' structure.
  41. ** It is used to create a 3D looking Bevel, like the string
  42. ** gadgets under Workbench 2.0.
  43. ** ============================================================
  44. */
  45.  
  46. typedef struct pcg_3DBevel
  47.    {
  48.       pcg_3DBox Outer, Inner;
  49.    } pcg_3DBevel;
  50.  
  51.  
  52. typedef struct pcg_3DThinBevel
  53.    {
  54.       Border         b[4];
  55.       SHORT          Points[20];
  56.    } pcg_3DThinBevel;
  57.    /*
  58.    ** ThinBevels are 2 pixels along the X axis, they're used for
  59.    ** embossed outline boxes.
  60.    */
  61.  
  62.  
  63. pcg_3DPens StandardPens __PARMS((void));
  64.    /*
  65.    ** Returns the standard color pens.  This works for both
  66.    ** Workbench 1.2/3 and Workbench 2.0.
  67.    */
  68.  
  69.  
  70. pcg_3DPens StandardScreenPens __PARMS(( struct Screen *whichscreen ));
  71.    /*
  72.    ** Written as a replacement for pcg_3DPens() -- EDB
  73.    ** This function is not tested under AmigaDOS 1.3 yet.
  74.    **
  75.    ** Returns the standard color pens. depending on depth of whichscreen.
  76.    ** If whichscreen == NULL, Workbench is presumed for Amiga OS 1.3 and
  77.    **    the default public screen is presumed for Amiga OS 2.x and above.
  78.    ** Monochrome screens get a proper 2D style look and screens with
  79.    ** Depths of 2 and greater are accomodated with proper pens for 3D style.
  80.    */
  81.  
  82. void pcg_Init3DBox __PARMS((
  83.                         pcg_3DBox *Box,
  84.                         SHORT      LeftEdge,
  85.                         SHORT      TopEdge,
  86.                         USHORT     Width,
  87.                         USHORT     Height,
  88.                         UBYTE      TopLeftPen,
  89.                         UBYTE      BottomRightPen,
  90.                         Border    *NextBorder
  91.                   ));
  92.  
  93.  
  94. void pcg_Init3DBevel __PARMS((
  95.                         pcg_3DBevel *Bevel,
  96.                         SHORT        LeftEdge,
  97.                         SHORT        TopEdge,
  98.                         USHORT       Width,
  99.                         USHORT       Height,
  100.                         USHORT       BevelWidth,
  101.                         UBYTE        TopLeftPen,
  102.                         UBYTE        BottomRightPen,
  103.                         Border      *NextBorder
  104.                     ));
  105.  
  106. /* LeftEdge, TopEdge, Width, Height refer to the _outer_ box.
  107. **
  108. ** 'BevelWidth' is the amount of blankspace between the inner and
  109. ** outer border.  (0 is an ok value.)
  110. **
  111. ** If 'TopLeftPen' is bright, and 'BottomRightPen' is dark, the bevel
  112. ** will appear to stand out.  If 'TopLeftPen' is dark, the bevel will
  113. ** appear recessed.
  114. */
  115.  
  116. void pcg_Init3DThinBevel __PARMS((
  117.                            pcg_3DThinBevel *Bevel,
  118.                            SHORT            LeftEdge,
  119.                            SHORT            TopEdge,
  120.                            USHORT           Width,
  121.                            USHORT           Height,
  122.                            USHORT           BevelWidth,
  123.                            UBYTE            TopLeftPen,
  124.                            UBYTE            BottomRightPen,
  125.                            Border          *NextBorder
  126.                         ));
  127.  
  128.  
  129. #endif
  130.